package eg.ci.mvn.service.api.constant;

import cn.hutool.core.collection.CollUtil;

import static eg.ci.mvn.service.api.model.param.ParkingCardParam.CardGroup;
import static eg.ci.mvn.service.api.model.param.ParkingGlobalParam.*;
import static eg.ci.mvn.service.api.model.param.ParkingMemberParam.CardMember;

public class DemoConstant {

    public static final ParkingResultGlobalParam GLOBAL = new ParkingResultGlobalParam();

    static {

        GLOBAL.setParkName("测试停车场");
        GLOBAL.setParkCode("420103000001");
        GLOBAL.setRegions(CollUtil.newArrayList(
                Region.builder().regionCode(GLOBAL.getParkCode() + "01").regionName("地面").build(),
                Region.builder().regionCode(GLOBAL.getParkCode() + "02").regionName("地下").build()
        ));
        GLOBAL.setGates(CollUtil.newArrayList(
                // 地面
                Gate.builder().gateCode(GLOBAL.getParkCode() + "0101").gateName("地面入口").gateType(1).build(),
                Gate.builder().gateCode(GLOBAL.getParkCode() + "0102").gateName("地面出口").gateType(2).build(),
                // 地下
                Gate.builder().gateCode(GLOBAL.getParkCode() + "0201").gateName("地下入口").gateType(1).build(),
                Gate.builder().gateCode(GLOBAL.getParkCode() + "0202").gateName("地下出口").gateType(2).build()
        ));
        GLOBAL.setCardGroups(CollUtil.newArrayList(
                // 临停车证
                CardGroup.builder().id("1").name("临停车证").classify(1)
                        .regionCode(GLOBAL.getParkCode() + "01" + "," + GLOBAL.getParkCode() + "02")
                        .cardRole(null).cardFee(null).accessRules(null).build(),

                // 访客车证
                CardGroup.builder().id("2").name("访客车证").classify(2)
                        .regionCode(GLOBAL.getParkCode() + "01" + "," + GLOBAL.getParkCode() + "02")
                        .cardRole(null).cardFee(null).accessRules(null).build(),

                // 白名单证
                CardGroup.builder().id("3").name("白名单证").classify(3)
                        .regionCode(GLOBAL.getParkCode() + "01" + "," + GLOBAL.getParkCode() + "02")
                        .cardRole(null).cardFee(null).accessRules(null).build(),

                // 黑名单证
                CardGroup.builder().id("4").name("黑名单证").classify(4)
                        .regionCode(GLOBAL.getParkCode() + "01" + "," + GLOBAL.getParkCode() + "02")
                        .cardRole(null).cardFee(null).accessRules(null).build(),

                // 会员卡证
                CardGroup.builder().id("5").name("会员卡证").classify(5)
                        .regionCode(GLOBAL.getParkCode() + "01" + "," + GLOBAL.getParkCode() + "02")
                        .cardRole(null).cardFee(null).accessRules(null).build()
        ));

        GLOBAL.setCardMembers(CollUtil.newArrayList(
                CardMember.builder().ownerName("2").roomNo("").classify(2).carPlateNo("鄂AEE102").carPlateColor("1")
                        .cardGroupId("2").cardGroupName("").startTime("20240101000000").endTime("20240131235959").build(),
                CardMember.builder().ownerName("3").roomNo("").classify(3).carPlateNo("鄂AEE103").carPlateColor("1")
                        .cardGroupId("3").cardGroupName("").startTime("20240101000000").endTime("20240131235959").build(),
                CardMember.builder().ownerName("4").roomNo("").classify(4).carPlateNo("鄂AEE104").carPlateColor("1")
                        .cardGroupId("4").cardGroupName("").startTime("20240101000000").endTime("20240131235959").build(),
                CardMember.builder().ownerName("5").roomNo("").classify(5).carPlateNo("鄂AEE105").carPlateColor("1")
                        .cardGroupId("5").cardGroupName("").startTime("20240101000000").endTime("20240131235959").build()

        ));
    }
}
